# $Id: Makefile,v 1.1.1.1 2004/02/21 18:48:07 ibo Exp $
# main makefile

all: test

# a target that might be filled by various instances of Makefile.local:
before.test :: Makefile.local

Makefile.local :
	{ echo "DIRCGI=$$HOME/public_html/cgi_bin" ;\
	  echo "DIRWWW=http://localhost/~$$USER/cgi-bin" ;\
	  echo "PERLLIBS=`pwd`" ;\
	} > Makefile.local

ifeq (Makefile.local, $(wildcard Makefile.local))
include Makefile.local
endif

PERL :=    perl -I$(PERLLIBS)
FOGEDIR := FOGE2
TESTDIR := test

always: makeLocalMakefile.sh
	@if [ "$$(hostname)" != "$$(cat .hostname)" ] ; \
	then \
		./$< ; \
	fi

test: before.test 
	make -C test

clean:
	-rm -f *~ $(FOGEDIR)/*~
	make -C $(TESTDIR) clean

realclean: clean

.PHONY: all test clean realclean always
